'use strict';

const Controller = require('egg/index').Controller;

class ECSController extends Controller {
  /**
   * 获取所有文件
   */
  allFiles() {
    const data = this.ctx.service.ecs.allFiles();
    this.ctx.sendSuccess(data);
  }

  deleteFile() {
    this.ctx.service.ecs.deleteFile();
    this.ctx.sendSuccess('删除成功');
  }

  deleteAll() {
    this.ctx.service.ecs.deleteAll();
    this.ctx.sendSuccess('删除成功');
  }
}

module.exports = ECSController;
